﻿
@{
    ViewBag.Title = "MZCBFYFX";
    Layout = "~/Views/Shared/_Form.cshtml";
    var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl");
    var reportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode");
}

<div class="rows">
	<div class="panel panel-default">
		<table class="form">
			<tr>
				<th class="formTitle">开始日期：</th>
				<td class="formValue">
					<input id="ksrq" type="text" class="form-control input-wdatepicker formClearIgnore" style="width:90px"
						   onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
						   onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
						   value="@DateTime.Now.ToString("yyyy-MM-01")" />
				</td>
				<th class="formTitle">结束日期：</th>
				<td class="formValue">
					<input id="jsrq" type="text" class="form-control input-wdatepicker formClearIgnore" style="width:90px"
						   onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
						   onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
						   value="@DateTime.Now.ToString("yyyy-MM-dd")" />
				</td>
				<th class="formTitle"></th>
				<td class="formValue" style="padding-left:20px;">
					<input type="button" id="btn_search" onclick="submit();" class="btn btn-primary btn-md" value="查询" style="width:55px" />
				</td>
				<th></th>
				<td></td>
				<th></th>
				<td></td>
			</tr>
		</table>
	</div>
</div>
<div class="ui-layout" id="layout" style="height:100%;width:100%;">
	<iframe class="ui-layout-center" style="width:100%;" id="iframerightiframerightiframerightttt" name="iframerightiframerightiframerightttt"
			scrolling="auto" allowtransparency="true" frameborder="0"></iframe>
</div>

<script>
	 var isHospAdministrator = '@(ViewBag.IsHospAdministrator)';
    var curUserCode = '@(ViewBag.CurUserCode)';
    var OrgId = '@(ViewBag.OrgId)';
	var reportServerHOST = '@(ViewBag.ReportServerHOST)';

	function submit() {
		if ($('#ksrq').val().length == 0 || $('#jsrq').val().length == 0) {
			$.modalAlert("请选择时间范围", "error");
			return;
		}
		var url = getUrl();
		$("#iframerightiframerightiframerightttt").attr('src', url);
	}

	$("#iframerightiframerightiframerightttt").load(function () {
		$.loading(false);
	});

	$(function () {
		var h = $(window).height() - 55
		$('#layout iframe').css('height', h);

	});
	 //刷新列表
    function refReport() {
        $("#btn_search").trigger('click');
    }

    function getUrl() {
        var srcUrl2 = '@Html.Raw(reportUrl)' + "?tempCode=1222" + "&orgId=" + OrgId + "&ksrq=" + $('#ksrq').val() + "&jsrq=" + $('#jsrq').val() + "&systemCode=" + '@reportSystemCode';
        return srcUrl2;
    }

</script>
